home *** CD-ROM | disk | FTP | other *** search
- Path: hubcap.clemson.edu!hubcap!mjs
- From: mjs@hubcap.clemson.edu (M. J. Saltzman)
- Newsgroups: comp.lang.c
- Subject: Re: floats in borland C++ 4.5
- Date: 18 Mar 96 01:42:48 GMT
- Organization: Clemson University
- Message-ID: <mjs.827113368@hubcap>
- References: <4if2ec$scg@bertrand.ccs.carleton.ca> <827086760snz@genesis.demon.co.uk> <4ii7co$18j@bertrand.ccs.carleton.ca>
- NNTP-Posting-Host: hubcap.clemson.edu
- X-Newsreader: NN version 6.5.0 #1
-
- abelo@chat.carleton.ca (Andrew Belo) writes:
-
- |> >void bubblesort( double *dblarray, int numberOfElements)
- |> >{
- |> > int top, search, temp;
- |> >[...]
- |> > {
- |> > temp = dblarray[search];
- |> > dblarray[search] = dblarray[top];
- |> > dblarray[top] = temp;
- |> > }
- |> >}
-
- | [...]
-
- |I have however found that if I go to the target expert and make it a
- ^^^^^^^^^^^^^ I assume this is
- a Borlandism.
- |floating point program it works fine!
-
- Umm, no, it doesn't, although it may *appear* to work fine in some
- circumstances. At the very least, you need to declare temp to be a
- double.
- --
- Matthew Saltzman
- Clemson University Math Sciences
- mjs@clemson.edu
-